<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" session="false" %>
<%@ page import="com.atozsoft.commonutil.Constants"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.SimpleDateFormat"%>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- 
  - Author(s): Administrator
  - Date: 2014-11-14 16:18:56
  - Description:
-->
<head>
<title>流程节点角色列表</title>
    <%@include file="/common.jsp"%>
	<%@include file="/common/common.jsp"%>
    <%@include file="/coframe/tools/skins/common.jsp" %>
	<style type="text/css">
    html, body{
        margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
    }    
    </style>
</head>
<body>
 <div style="padding-top:5px">
	<div id="addAsCustomerForm" style="margin-top:5px;">
		<div id="datagrid1" class="nui-datagrid" style="width:100%;height:345px" 
       		 url="com.atozsoft.wf.processManager.queryRoleList.biz.ext" idField="id" dataField="roles"
       		 allowResize="true" showPager="false" pagesize="50" onlyCheckSelection="false" onRowdblclick="dbclickRow"
      	     allowCellEdit="true" allowCellSelect="true" multiSelect="false"  
      		 allowCellValid="true">
	        <div property="columns">
	        	<div field="roleId" visible="false"></div>
	        	<div field="roleCode" visible="false"></div>
	        	<div type="checkcolumn" width="20px"></div>        
	            <div field="roleName"  width="120" headerAlign="center">角色名称
	            </div> <!--                
	            <div field="buttonAlias" vtype="maxLength:200" width="100"  headerAlign="center">别名
	                <input property="editor" class="nui-textbox"  style="width:100%;" />
	            </div> -->
	        </div>
	    </div>
        <div class="nui-toolbar" style="text-align:center;padding-top:5px;padding-bottom:5px;" borderStyle="border:0;">
	        <a class="nui-button" style="width:60px;" iconCls="icon-save" onclick="onOk()">确定</a>
	        <span style="display:inline-block;width:25px;"></span>
	        <a class="nui-button" style="width:60px;" iconCls="icon-cancel" onclick="onCancel()">取消</a>
	    </div>        
    </div>
</div>


	<script type="text/javascript">
    	nui.parse();
    	var grid = nui.get("datagrid1");
    	grid.load();
    	
    	
    	//返回数据
    	function GetData(){
    		var data = grid.getSelected();
    		return {'rolecode':data.roleCode,'rolename':data.roleName};;
    	}
    	
    	//点击选择页面
    	function dbclickRow(){
    		onOk();
    	}
    	
    	//保存
    	function onOk(){
			var row = grid.getSelected();
		    if(row){
		    	CloseWindow('ok');
		    }else{
		        nui.alert("请选择一条记录", "提示");
		    }
    	}
    	
    	//取消
    	function onCancel(){
    	    CloseWindow("cancel");
    	}
    	function CloseWindow(action) {
	        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
	        else window.close();
	    }
	   
    </script>
</body>
</html>